package com.fih.study.dubboconsumer.controller;

import com.fih.study.dubbodemoapi.api.HelloWorldApi;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @DubboReference(version = "1.0.0")
    private HelloWorldApi helloWorldApi;

    @GetMapping("/hello")
    public String hello(String name) {

        return helloWorldApi.sayHello(name);
    }
}
